<?php
/**
 * <https://y.st./>
 * Copyright © 2018 Alex Yst <mailto:copyright@y.st>
 * 
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program. If not, see <https://www.gnu.org./licenses/>.
**/

$xhtml = array(
	'<{title}>' => 'Nearly done with <code>yellow</code>',
	'takedown' => '2017-11-01',
	'<{body}>' => <<<END
<section id="drudgery">
	<h2>Drudgery</h2>
	<p>
		My professor left me the following feedback on my <a href="/en/coursework/MATH1201/index.xhtml#Unit6">learning journal entry from last week</a>:
	</p>
	<blockquote>
		<p>
			Glad your worth has diminished.
		</p>
	</blockquote>
	<p>
		I&apos;m so confused.
		In what way has my worth diminished?
		That ... that sounds like an insult.
		I&apos;m not sure what the professor means, but it&apos;s probably not that my worth as a person has gone down, as it sounds like.
	</p>
	<p>
		I took a look at the main maths assignment for the week and saw this:
	</p>
	<blockquote>
		<p>
			Hint (2x = x + x)
		</p>
	</blockquote>
	<p>
		I busted up laughing.
		Yeah, I think I know how multiplication works.
		You add something to itself as times as indicated.
	</p>
	<p>
		The toxicity in me from the school is building.
		I&apos;m starting to spew it into the assigned discussion boards at times.
		For example, the post I made on <a href="/en/weblog/2018/03-March/14.xhtml#drudgery">Wednesday</a> ...
		Anyway, it&apos;ll be over soon.
		The term will anyway, not the whole university ordeal or censorship issue.
	</p>
	<p>
		My discussion post for the day:
	</p>
	<blockquote>
		<p>
			I like how in-depth your explanation is.
			You really did your research!
			I wasn&apos;t really sure where to even start.
		</p>
		<p>
			I also ran across that base sixty system of the Babylonians, but I didn&apos;t think to include that as the article I saw it in didn&apos;t even mention trigonometry.
			You make a good point too about using trigonometry to estimate vast distances.
		</p>
	</blockquote>
</section>
<section id="Minetest">
	<h2>Minetest</h2>
	<img src="/y.st./source/y.st./static/img/CC_BY-SA_3.0/minetest.net./weblog/2018/03/19.png" alt="A small lava-storage pool in the bunker" class="framed-centred-image" width="800" height="600"/>
	<p>
		With my previously-unrealised issue with <code>yellow</code> out of the way, I&apos;m actually making progress on that mod now.
		I didn&apos;t feel like I could get anywhere with the back end stuff unless I had the physical bed itself to work with, so I finished programming that.
		I didn&apos;t want to work with dummy images, so I got the textures worked out as well.
		It was an interesting challenge getting the $a[GIMP] to alter the colour of the red bed texture for me.
		I didn&apos;t want to recolour it pixel by pixel and I wanted to keep the pattern of the bed instead of paining it into an ugly solid mess.
		I managed to figure out how to pull it off after some toying with it though.
	</p>
	<p>
		After I had my images, I realised that the colour yellow was chosen for legacy reasons that no longer apply.
		First off, it was chosen because it was the least likely colour of bed to have coal in it.
		Coal was finite and I didn&apos;t want it wasted, but I fixed that.
		Secondly, I wanted cotton to be the only countable drop to be in the bed, again trying to exclude coal.
		However, saplings are now countable, making wood a material from a counted drop.
		The beds include wood, a non-cotton, counted material and coal is no longer finite.
		There&apos;s no reason to have the beds be yellow any more, they just have to not be red (so they can be easily and visually distinguished from the default red beds, which behave very differently than my yellow beds).
		I might leave the beds yellow, both because I&apos;ve already got the textures and because they&apos;ve been the yellow beds in my mind for so long.
		I might change the colour though.
		Various colours come to mind.
		I don&apos;t particularly enjoy the colour yellow, and my favourite colour is cyan.
		I could do cyan beds.
		I could also reverse my coal stance, using black or dark green cotton.
		That said, the next version of Minetest Game includes black flowers to be made into black dye, so black and dark green cotton won&apos;t necessarily even have coal in them.
		Since the initial beds are red, I could go with a different primary colour: blue or green.
		I think the best idea I came up with was to try to make the recipe complex, requiring more colours of dye to mix.
		That requires that players gather more types of materials in order to craft the beds.
		Of all the dyes, only two require that three dyes be mixed to obtain them: magenta and dark green.
		All other dyes can be crafted directly or obtained from mixing only two dyes.
		The next version of Minetest Game adds green flowers that can be crafted into green dye, so there&apos;s no premix needed to craft the green dye with black dye to get the dark green dye.
		That leaves magenta.
		Magenta is an obnoxious colour for a bed though.
		Weighing my options is taking too much effort.
		I&apos;ll likely stick with yellow just for simplicity&apos;s sake.
	</p>
	<p>
		After debating about the colour, I wrote up the rest of the code for the physical aspects of the beds, such as the code preventing players from placing too many beds and the code for preventing players from removing beds soon after placing them.
		The warping aspect of the beds is something I&apos;ll have to leave for tomorrow or another day.
	</p>
</section>
END
);
